<?php
/**
*ACS自动启用或者禁止
*/

require_once 'common.inc.php';
!in_array('2',$larr)&&adminmsg('你没有被赋予操作该项的权限！');

$matches=parse_url($_SERVER['HTTP_REFERER']);
//$url=$matches['scheme'].'://'.$matches['host'].'/';


if('acslist'==$action)
{


	$sql="select * from area order by btcid ";
	$query=$dsdb->query($sql);
	while($btc=$dsdb->fetch_array($query))
	{
		$acslist[]=$btc;
	}
	include_once MCC_ROOT.'/templates/msystem/acslist.htm';
}
elseif('acsprucess'==$action)
{
	$action='acsprucess';
header("<meta http-equiv='Content-Type\' content='text/html; charset=utf-8' />");
echo "测试数据输出！<pre>";

//取出数组元素，除倒数第一个外
$abc = array_slice($_POST,0,-1);
//然后将
$str = implode(',',$abc);

//生成缓存文件
$filename="../push/log/acstxt.php";
$fp=fopen($filename,'wb+');
if($fp)
	{
		fwrite($fp,$str);
		fclose($fp);
		adminmsg('更新内容操作成功',"autoacs.inc.php?action=acslist");
	}
	else
		adminmsg('更新内容操作失败',"autoacs.inc.php?action=acslist");



}
?>
